package com.zecan.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ConfigClientController
 * @Description TODO
 * @date 2022/5/9 15:11
 * @Version 1.0
 */
@RestController
@RefreshScope
public class ConfigClientController {

    @Value(value = "${server.port}")
    private String serverPort;

    @Value(value = "${config.info}")
    private  String info;

    @GetMapping("/configInfo")
    public String getConfigInfo(){
        return info + "serverPort:" + serverPort;
    }
}
